from django.db import models
class Level(models.Model):
    name=models.CharField(max_length=100)
    def __str__(self):
        return self.name
    class Meta:
        db_table='level'
class Member(models.Model):
    name=models.CharField(max_length=100)
    phone=models.CharField(max_length=100)
    addtime=models.DateTimeField(auto_now_add=True)
    price=models.IntegerField(default=0)
    birthday=models.DateField(null=True)
    lsno=models.CharField(max_length=100)
    isdel=models.BooleanField(default=False)
    level=models.ForeignKey(Level,on_delete=models.CASCADE)
    def __str__(self):
        return self.name
    class Meta:
        db_table='member'